<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.weifly.jettycn.domain.Project" %>
<%@ page import="com.weifly.jettycn.JettycnUtil" %>
<%@ page import="com.weifly.jettycn.util.PageInfo" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%
	PageInfo proPageInfo = (PageInfo)request.getAttribute("projectList");
%>

<table class="table_layout" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td>
      <dl class="dl_list1">
<%
	List dataList = proPageInfo.getDataList();
	for(int i=0;i<dataList.size();i++){
		Project pro = (Project)dataList.get(i);
		String desc = null;
		if(pro.getDescription()==null){
			desc = "";
		}else{
			String temp = pro.getDescription().trim();
			desc = temp.replaceAll("<.*>", "");
			if(desc.length()>180){
				desc = desc.substring(0, 100) + "...";
			}
		}
%>
        <dt>
          <a href="<%=request.getContextPath()%>/project/detail.do?project=<%=pro.getPrjid()%>"><%=pro.getName()%></a>
          <span>[<a href="<%=request.getContextPath()%>/project/main.do?catalog=<%=pro.getCatalogid()%>"><%=JettycnUtil.translateCatalog(pro.getCatalogid())%></a>]</span>
        </dt>
        <dd>
          <span>更新时间：<%=JettycnUtil.formatDateTime(pro.getUpdate()) %></span> | <span>作者：<%=pro.getAuthor()%></span> | <span>主页：<%=pro.getHomepage()%></span>
          <p><%=desc%></p>
        </dd>
<%
	}
%>
      </dl>
    </td>
  </tr>
  <tr>
    <td align="right">
<%
	Map<String, String> paramMap = new HashMap<String, String>();
	paramMap.put("catalog", request.getParameter("catalog"));
	JettycnUtil.outPagebar(request, out, proPageInfo, "/project/main.do", paramMap);
%>
    </td>
  </tr>
</table>